<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<!-- 第一步 引用vue.js -->
		<!-- CDN方式 -->
		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<!-- 第二步 创建一个div 作为视图 -->
		<div id="app">
			{{message}}<br />
			{{index+1}}<br />
			{{isMarried?"已婚":"未婚"}}<br />
			{{scores[0]}}<br />
			{{student.name}}{{student.age}}<br />
			{{stus[2].name}}{{stus[2].age}}<br /> 
		</div>
		
		<script>			
			// 第三步 创建一个vue的实例对象
			var app = Vue.createApp({
				data(){
					return {
						message: "Hello World!",
						index: 0,
						isMarried: true,
						scores: [100, 99, 98],
						student: {name:"shyoki", age:18},
						stus:[
							{name:"小A",age:20},
							{name:"小B",age:21},
							{name:"小C",age:22}
						]
						}
				}
			});
			// 第四步 把app挂载到视图上
			var vm = app.mount("#app")
		</script>
	</body>
</html>
